package com.ruoyi.record.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotBlank;

import com.ruoyi.common.mybatisplus.core.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;

/**
 * 请假记录对象 record_leave
 * 
 * @author ruoyi
 * @date 2022-11-10
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("record_leave")
public class RecordLeave extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long leaveId;

    /** 人员类型 */
    @NotBlank(message = "人员类型不能为空")
    @Excel(name = "人员类型", dictType = "record_user_type")
    private String userType;

    /** 代理人 */
    @Excel(name = "代理人")
    private String agentUser;

    /** 休假类型 */
    @NotBlank(message = "休假类型不能为空")
    @Excel(name = "休假类型", dictType = "record_leave_type")
    private String leaveType;

    /** 请假事由 */
    @Excel(name = "请假事由")
    private String leaveContent;

    /** 开始时间 */
    @NotBlank(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @NotBlank(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 天数 */
    @NotBlank(message = "天数不能为空")
    @Excel(name = "天数")
    private Long days;

    /** 打印标识（0未打印1已打印） */
    @Excel(name = "打印标识", readConverterExp = "0=未打印1已打印")
    private String printFlag;

    private Long deptId;

    /** 删除标识（0正常2删除） */
    @TableLogic
    private String delFlag;

    /** 员工姓名 */
    @TableField(exist = false)
    private String userName;

    /** 员工职务 */
    @TableField(exist = false)
    private String dutyName;

}
